package factory.pizzafm;

import java.util.Objects;

/**
 * @author jacob
 * @Date 2020/12/20 21:44
 */
public class ChicagoStylePizzaStore extends PizzaStore {
    @Override
    Pizza createPizza(PizzaType type) {
        if (Objects.equals(PizzaType.CHEESE, type)) {
            return new ChicagoStyleCheesePizza();
        } else if (Objects.equals(PizzaType.PEPPERONI, type)) {
            return new ChicagoStylePepperoniPizza();
        } else if (Objects.equals(PizzaType.CLAM, type)) {
            return new ChicagoStyleClamPizza();
        } else if (Objects.equals(PizzaType.VEGGIE, type)) {
            return new ChicagoStyleVeggiePizza();
        }

        return null;
    }
}
